import request from '@/utils/request'

// 获取精选题库列表
export const getSubjectListApi = (params) => request({
    url:'/questions/choice',
    params
})

// 获取学科列表
export const getSubjectApi = (params) => request({
    url:'/subjects',
    params
})

// 上架下架状态
export const changePublishStateApi =({id, publishState}) => request({
    url:`/questions/choice/${id}/${publishState}`,
    method:'post'
})

// 删除
export const delListApi = (id) => request({
    url:`/questions/${id}`,
    method:'delete'
})

// 审核
export const checkSuggestion = (data) => request({
    url:'/questions/check/' + data.id,
    method:'post',
    data
})

// 预览
export const previewList = (id) => request({
    url:`/questions/${id}?${id}`
})

// 学科
export const subjectTypeApi = (params) => request({
    url:'/subjects',
    params
})

// 标签
export const tagsListApi = (params) => request({
    url:'/tags',
    params
})

// 二级目录
export const secondedDirectorysApi = (params) =>request({
    url:'/directorys',
    params
})
